{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>movie_id</th>\n",
       "      <th>title</th>\n",
       "      <th>genres</th>\n",
       "      <th>user_id</th>\n",
       "      <th>rating</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>gender</th>\n",
       "      <th>age</th>\n",
       "      <th>occupation</th>\n",
       "      <th>zip</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>Toy Story (1995)</td>\n",
       "      <td>Animation|Children's|Comedy</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978824268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>48</td>\n",
       "      <td>Pocahontas (1995)</td>\n",
       "      <td>Animation|Children's|Musical|Romance</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978824351</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>150</td>\n",
       "      <td>Apollo 13 (1995)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978301777</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>260</td>\n",
       "      <td>Star Wars: Episode IV - A New Hope (1977)</td>\n",
       "      <td>Action|Adventure|Fantasy|Sci-Fi</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978300760</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>527</td>\n",
       "      <td>Schindler's List (1993)</td>\n",
       "      <td>Drama|War</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978824195</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>531</td>\n",
       "      <td>Secret Garden, The (1993)</td>\n",
       "      <td>Children's|Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978302149</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>588</td>\n",
       "      <td>Aladdin (1992)</td>\n",
       "      <td>Animation|Children's|Comedy|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978824268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>594</td>\n",
       "      <td>Snow White and the Seven Dwarfs (1937)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978302268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>595</td>\n",
       "      <td>Beauty and the Beast (1991)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978824268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>608</td>\n",
       "      <td>Fargo (1996)</td>\n",
       "      <td>Crime|Drama|Thriller</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978301398</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>661</td>\n",
       "      <td>James and the Giant Peach (1996)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>978302109</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>720</td>\n",
       "      <td>Wallace &amp; Gromit: The Best of Aardman Animatio...</td>\n",
       "      <td>Animation</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>978300760</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>745</td>\n",
       "      <td>Close Shave, A (1995)</td>\n",
       "      <td>Animation|Comedy|Thriller</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>978824268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>783</td>\n",
       "      <td>Hunchback of Notre Dame, The (1996)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978824291</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>914</td>\n",
       "      <td>My Fair Lady (1964)</td>\n",
       "      <td>Musical|Romance</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>978301968</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>919</td>\n",
       "      <td>Wizard of Oz, The (1939)</td>\n",
       "      <td>Adventure|Children's|Drama|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978301368</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>938</td>\n",
       "      <td>Gigi (1958)</td>\n",
       "      <td>Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978301752</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1022</td>\n",
       "      <td>Cinderella (1950)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978300055</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>1028</td>\n",
       "      <td>Mary Poppins (1964)</td>\n",
       "      <td>Children's|Comedy|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978301777</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1029</td>\n",
       "      <td>Dumbo (1941)</td>\n",
       "      <td>Animation|Children's|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978302205</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1035</td>\n",
       "      <td>Sound of Music, The (1965)</td>\n",
       "      <td>Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978301753</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1097</td>\n",
       "      <td>E.T. the Extra-Terrestrial (1982)</td>\n",
       "      <td>Children's|Drama|Fantasy|Sci-Fi</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978301953</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1193</td>\n",
       "      <td>One Flew Over the Cuckoo's Nest (1975)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978300760</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1197</td>\n",
       "      <td>Princess Bride, The (1987)</td>\n",
       "      <td>Action|Adventure|Comedy|Romance</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>978302268</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1207</td>\n",
       "      <td>To Kill a Mockingbird (1962)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978300719</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1246</td>\n",
       "      <td>Dead Poets Society (1989)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978302091</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>1270</td>\n",
       "      <td>Back to the Future (1985)</td>\n",
       "      <td>Comedy|Sci-Fi</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978300055</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1287</td>\n",
       "      <td>Ben-Hur (1959)</td>\n",
       "      <td>Action|Adventure|Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>978302039</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>1545</td>\n",
       "      <td>Ponette (1996)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978824139</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>1566</td>\n",
       "      <td>Hercules (1997)</td>\n",
       "      <td>Adventure|Animation|Children's|Comedy|Musical</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>978824330</td>\n",
       "      <td>F</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>48067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000179</th>\n",
       "      <td>2763</td>\n",
       "      <td>Thomas Crown Affair, The (1999)</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958492554</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000180</th>\n",
       "      <td>2770</td>\n",
       "      <td>Bowfinger (1999)</td>\n",
       "      <td>Comedy</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958490923</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000181</th>\n",
       "      <td>2805</td>\n",
       "      <td>Mickey Blue Eyes (1999)</td>\n",
       "      <td>Comedy|Romance</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958492371</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000182</th>\n",
       "      <td>2827</td>\n",
       "      <td>Astronaut's Wife, The (1999)</td>\n",
       "      <td>Sci-Fi|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>2</td>\n",
       "      <td>958490886</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000183</th>\n",
       "      <td>2840</td>\n",
       "      <td>Stigmata (1999)</td>\n",
       "      <td>Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958492512</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000184</th>\n",
       "      <td>2841</td>\n",
       "      <td>Stir of Echoes (1999)</td>\n",
       "      <td>Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>2</td>\n",
       "      <td>958492512</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000185</th>\n",
       "      <td>2858</td>\n",
       "      <td>American Beauty (1999)</td>\n",
       "      <td>Comedy|Drama</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958490857</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000186</th>\n",
       "      <td>2881</td>\n",
       "      <td>Double Jeopardy (1999)</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958490981</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000187</th>\n",
       "      <td>2907</td>\n",
       "      <td>Superstar (1999)</td>\n",
       "      <td>Comedy</td>\n",
       "      <td>5727</td>\n",
       "      <td>1</td>\n",
       "      <td>958492554</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000188</th>\n",
       "      <td>3005</td>\n",
       "      <td>Bone Collector, The (1999)</td>\n",
       "      <td>Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>2</td>\n",
       "      <td>958490923</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000189</th>\n",
       "      <td>3053</td>\n",
       "      <td>Messenger: The Story of Joan of Arc, The (1999)</td>\n",
       "      <td>Drama|War</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958492345</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000190</th>\n",
       "      <td>3081</td>\n",
       "      <td>Sleepy Hollow (1999)</td>\n",
       "      <td>Horror|Romance</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958492512</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000191</th>\n",
       "      <td>3113</td>\n",
       "      <td>End of Days (1999)</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958490981</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000192</th>\n",
       "      <td>3114</td>\n",
       "      <td>Toy Story 2 (1999)</td>\n",
       "      <td>Animation|Children's|Comedy</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958492554</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000193</th>\n",
       "      <td>3176</td>\n",
       "      <td>Talented Mr. Ripley, The (1999)</td>\n",
       "      <td>Drama|Mystery|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958492554</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000194</th>\n",
       "      <td>3177</td>\n",
       "      <td>Next Friday (1999)</td>\n",
       "      <td>Comedy</td>\n",
       "      <td>5727</td>\n",
       "      <td>1</td>\n",
       "      <td>958489748</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000195</th>\n",
       "      <td>3273</td>\n",
       "      <td>Scream 3 (2000)</td>\n",
       "      <td>Horror|Mystery|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958492479</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000196</th>\n",
       "      <td>3301</td>\n",
       "      <td>Whole Nine Yards, The (2000)</td>\n",
       "      <td>Comedy|Crime</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958490142</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000197</th>\n",
       "      <td>3316</td>\n",
       "      <td>Reindeer Games (2000)</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958490699</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000198</th>\n",
       "      <td>3317</td>\n",
       "      <td>Wonder Boys (2000)</td>\n",
       "      <td>Comedy|Drama</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958489879</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000199</th>\n",
       "      <td>3408</td>\n",
       "      <td>Erin Brockovich (2000)</td>\n",
       "      <td>Drama</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958489879</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000200</th>\n",
       "      <td>3409</td>\n",
       "      <td>Final Destination (2000)</td>\n",
       "      <td>Drama|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958490143</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000201</th>\n",
       "      <td>3481</td>\n",
       "      <td>High Fidelity (2000)</td>\n",
       "      <td>Comedy</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958489879</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000202</th>\n",
       "      <td>3483</td>\n",
       "      <td>Road to El Dorado, The (2000)</td>\n",
       "      <td>Animation|Children's</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958490143</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000203</th>\n",
       "      <td>3484</td>\n",
       "      <td>Skulls, The (2000)</td>\n",
       "      <td>Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>1</td>\n",
       "      <td>958489902</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000204</th>\n",
       "      <td>3513</td>\n",
       "      <td>Rules of Engagement (2000)</td>\n",
       "      <td>Drama|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>4</td>\n",
       "      <td>958489970</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000205</th>\n",
       "      <td>3535</td>\n",
       "      <td>American Psycho (2000)</td>\n",
       "      <td>Comedy|Horror|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>2</td>\n",
       "      <td>958489970</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000206</th>\n",
       "      <td>3536</td>\n",
       "      <td>Keeping the Faith (2000)</td>\n",
       "      <td>Comedy|Romance</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958489902</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000207</th>\n",
       "      <td>3555</td>\n",
       "      <td>U-571 (2000)</td>\n",
       "      <td>Action|Thriller</td>\n",
       "      <td>5727</td>\n",
       "      <td>3</td>\n",
       "      <td>958490699</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000208</th>\n",
       "      <td>3578</td>\n",
       "      <td>Gladiator (2000)</td>\n",
       "      <td>Action|Drama</td>\n",
       "      <td>5727</td>\n",
       "      <td>5</td>\n",
       "      <td>958490171</td>\n",
       "      <td>M</td>\n",
       "      <td>25</td>\n",
       "      <td>4</td>\n",
       "      <td>92843</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000209 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         movie_id                                              title  \\\n",
       "0               1                                   Toy Story (1995)   \n",
       "1              48                                  Pocahontas (1995)   \n",
       "2             150                                   Apollo 13 (1995)   \n",
       "3             260          Star Wars: Episode IV - A New Hope (1977)   \n",
       "4             527                            Schindler's List (1993)   \n",
       "5             531                          Secret Garden, The (1993)   \n",
       "6             588                                     Aladdin (1992)   \n",
       "7             594             Snow White and the Seven Dwarfs (1937)   \n",
       "8             595                        Beauty and the Beast (1991)   \n",
       "9             608                                       Fargo (1996)   \n",
       "10            661                   James and the Giant Peach (1996)   \n",
       "11            720  Wallace & Gromit: The Best of Aardman Animatio...   \n",
       "12            745                              Close Shave, A (1995)   \n",
       "13            783                Hunchback of Notre Dame, The (1996)   \n",
       "14            914                                My Fair Lady (1964)   \n",
       "15            919                           Wizard of Oz, The (1939)   \n",
       "16            938                                        Gigi (1958)   \n",
       "17           1022                                  Cinderella (1950)   \n",
       "18           1028                                Mary Poppins (1964)   \n",
       "19           1029                                       Dumbo (1941)   \n",
       "20           1035                         Sound of Music, The (1965)   \n",
       "21           1097                  E.T. the Extra-Terrestrial (1982)   \n",
       "22           1193             One Flew Over the Cuckoo's Nest (1975)   \n",
       "23           1197                         Princess Bride, The (1987)   \n",
       "24           1207                       To Kill a Mockingbird (1962)   \n",
       "25           1246                          Dead Poets Society (1989)   \n",
       "26           1270                          Back to the Future (1985)   \n",
       "27           1287                                     Ben-Hur (1959)   \n",
       "28           1545                                     Ponette (1996)   \n",
       "29           1566                                    Hercules (1997)   \n",
       "...           ...                                                ...   \n",
       "1000179      2763                    Thomas Crown Affair, The (1999)   \n",
       "1000180      2770                                   Bowfinger (1999)   \n",
       "1000181      2805                            Mickey Blue Eyes (1999)   \n",
       "1000182      2827                       Astronaut's Wife, The (1999)   \n",
       "1000183      2840                                    Stigmata (1999)   \n",
       "1000184      2841                              Stir of Echoes (1999)   \n",
       "1000185      2858                             American Beauty (1999)   \n",
       "1000186      2881                             Double Jeopardy (1999)   \n",
       "1000187      2907                                   Superstar (1999)   \n",
       "1000188      3005                         Bone Collector, The (1999)   \n",
       "1000189      3053    Messenger: The Story of Joan of Arc, The (1999)   \n",
       "1000190      3081                               Sleepy Hollow (1999)   \n",
       "1000191      3113                                 End of Days (1999)   \n",
       "1000192      3114                                 Toy Story 2 (1999)   \n",
       "1000193      3176                    Talented Mr. Ripley, The (1999)   \n",
       "1000194      3177                                 Next Friday (1999)   \n",
       "1000195      3273                                    Scream 3 (2000)   \n",
       "1000196      3301                       Whole Nine Yards, The (2000)   \n",
       "1000197      3316                              Reindeer Games (2000)   \n",
       "1000198      3317                                 Wonder Boys (2000)   \n",
       "1000199      3408                             Erin Brockovich (2000)   \n",
       "1000200      3409                           Final Destination (2000)   \n",
       "1000201      3481                               High Fidelity (2000)   \n",
       "1000202      3483                      Road to El Dorado, The (2000)   \n",
       "1000203      3484                                 Skulls, The (2000)   \n",
       "1000204      3513                         Rules of Engagement (2000)   \n",
       "1000205      3535                             American Psycho (2000)   \n",
       "1000206      3536                           Keeping the Faith (2000)   \n",
       "1000207      3555                                       U-571 (2000)   \n",
       "1000208      3578                                   Gladiator (2000)   \n",
       "\n",
       "                                                genres  user_id  rating  \\\n",
       "0                          Animation|Children's|Comedy        1       5   \n",
       "1                 Animation|Children's|Musical|Romance        1       5   \n",
       "2                                                Drama        1       5   \n",
       "3                      Action|Adventure|Fantasy|Sci-Fi        1       4   \n",
       "4                                            Drama|War        1       5   \n",
       "5                                     Children's|Drama        1       4   \n",
       "6                  Animation|Children's|Comedy|Musical        1       4   \n",
       "7                         Animation|Children's|Musical        1       4   \n",
       "8                         Animation|Children's|Musical        1       5   \n",
       "9                                 Crime|Drama|Thriller        1       4   \n",
       "10                        Animation|Children's|Musical        1       3   \n",
       "11                                           Animation        1       3   \n",
       "12                           Animation|Comedy|Thriller        1       3   \n",
       "13                        Animation|Children's|Musical        1       4   \n",
       "14                                     Musical|Romance        1       3   \n",
       "15                  Adventure|Children's|Drama|Musical        1       4   \n",
       "16                                             Musical        1       4   \n",
       "17                        Animation|Children's|Musical        1       5   \n",
       "18                           Children's|Comedy|Musical        1       5   \n",
       "19                        Animation|Children's|Musical        1       5   \n",
       "20                                             Musical        1       5   \n",
       "21                     Children's|Drama|Fantasy|Sci-Fi        1       4   \n",
       "22                                               Drama        1       5   \n",
       "23                     Action|Adventure|Comedy|Romance        1       3   \n",
       "24                                               Drama        1       4   \n",
       "25                                               Drama        1       4   \n",
       "26                                       Comedy|Sci-Fi        1       5   \n",
       "27                              Action|Adventure|Drama        1       5   \n",
       "28                                               Drama        1       4   \n",
       "29       Adventure|Animation|Children's|Comedy|Musical        1       4   \n",
       "...                                                ...      ...     ...   \n",
       "1000179                                Action|Thriller     5727       5   \n",
       "1000180                                         Comedy     5727       4   \n",
       "1000181                                 Comedy|Romance     5727       4   \n",
       "1000182                                Sci-Fi|Thriller     5727       2   \n",
       "1000183                                       Thriller     5727       3   \n",
       "1000184                                       Thriller     5727       2   \n",
       "1000185                                   Comedy|Drama     5727       5   \n",
       "1000186                                Action|Thriller     5727       3   \n",
       "1000187                                         Comedy     5727       1   \n",
       "1000188                                       Thriller     5727       2   \n",
       "1000189                                      Drama|War     5727       3   \n",
       "1000190                                 Horror|Romance     5727       4   \n",
       "1000191                                Action|Thriller     5727       3   \n",
       "1000192                    Animation|Children's|Comedy     5727       5   \n",
       "1000193                         Drama|Mystery|Thriller     5727       3   \n",
       "1000194                                         Comedy     5727       1   \n",
       "1000195                        Horror|Mystery|Thriller     5727       4   \n",
       "1000196                                   Comedy|Crime     5727       5   \n",
       "1000197                                Action|Thriller     5727       3   \n",
       "1000198                                   Comedy|Drama     5727       4   \n",
       "1000199                                          Drama     5727       5   \n",
       "1000200                                 Drama|Thriller     5727       4   \n",
       "1000201                                         Comedy     5727       4   \n",
       "1000202                           Animation|Children's     5727       3   \n",
       "1000203                                       Thriller     5727       1   \n",
       "1000204                                 Drama|Thriller     5727       4   \n",
       "1000205                         Comedy|Horror|Thriller     5727       2   \n",
       "1000206                                 Comedy|Romance     5727       5   \n",
       "1000207                                Action|Thriller     5727       3   \n",
       "1000208                                   Action|Drama     5727       5   \n",
       "\n",
       "         timestamp gender  age  occupation    zip  \n",
       "0        978824268      F    1          10  48067  \n",
       "1        978824351      F    1          10  48067  \n",
       "2        978301777      F    1          10  48067  \n",
       "3        978300760      F    1          10  48067  \n",
       "4        978824195      F    1          10  48067  \n",
       "5        978302149      F    1          10  48067  \n",
       "6        978824268      F    1          10  48067  \n",
       "7        978302268      F    1          10  48067  \n",
       "8        978824268      F    1          10  48067  \n",
       "9        978301398      F    1          10  48067  \n",
       "10       978302109      F    1          10  48067  \n",
       "11       978300760      F    1          10  48067  \n",
       "12       978824268      F    1          10  48067  \n",
       "13       978824291      F    1          10  48067  \n",
       "14       978301968      F    1          10  48067  \n",
       "15       978301368      F    1          10  48067  \n",
       "16       978301752      F    1          10  48067  \n",
       "17       978300055      F    1          10  48067  \n",
       "18       978301777      F    1          10  48067  \n",
       "19       978302205      F    1          10  48067  \n",
       "20       978301753      F    1          10  48067  \n",
       "21       978301953      F    1          10  48067  \n",
       "22       978300760      F    1          10  48067  \n",
       "23       978302268      F    1          10  48067  \n",
       "24       978300719      F    1          10  48067  \n",
       "25       978302091      F    1          10  48067  \n",
       "26       978300055      F    1          10  48067  \n",
       "27       978302039      F    1          10  48067  \n",
       "28       978824139      F    1          10  48067  \n",
       "29       978824330      F    1          10  48067  \n",
       "...            ...    ...  ...         ...    ...  \n",
       "1000179  958492554      M   25           4  92843  \n",
       "1000180  958490923      M   25           4  92843  \n",
       "1000181  958492371      M   25           4  92843  \n",
       "1000182  958490886      M   25           4  92843  \n",
       "1000183  958492512      M   25           4  92843  \n",
       "1000184  958492512      M   25           4  92843  \n",
       "1000185  958490857      M   25           4  92843  \n",
       "1000186  958490981      M   25           4  92843  \n",
       "1000187  958492554      M   25           4  92843  \n",
       "1000188  958490923      M   25           4  92843  \n",
       "1000189  958492345      M   25           4  92843  \n",
       "1000190  958492512      M   25           4  92843  \n",
       "1000191  958490981      M   25           4  92843  \n",
       "1000192  958492554      M   25           4  92843  \n",
       "1000193  958492554      M   25           4  92843  \n",
       "1000194  958489748      M   25           4  92843  \n",
       "1000195  958492479      M   25           4  92843  \n",
       "1000196  958490142      M   25           4  92843  \n",
       "1000197  958490699      M   25           4  92843  \n",
       "1000198  958489879      M   25           4  92843  \n",
       "1000199  958489879      M   25           4  92843  \n",
       "1000200  958490143      M   25           4  92843  \n",
       "1000201  958489879      M   25           4  92843  \n",
       "1000202  958490143      M   25           4  92843  \n",
       "1000203  958489902      M   25           4  92843  \n",
       "1000204  958489970      M   25           4  92843  \n",
       "1000205  958489970      M   25           4  92843  \n",
       "1000206  958489902      M   25           4  92843  \n",
       "1000207  958490699      M   25           4  92843  \n",
       "1000208  958490171      M   25           4  92843  \n",
       "\n",
       "[1000209 rows x 10 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "m_col_name = ['movie_id', 'title', 'genres']\n",
    "movies = pd.read_table('ml-1m/movies.dat', sep='::', engine='python', header=None, names=m_col_name)\n",
    "u_col_name = ['user_id', 'gender', 'age', 'occupation', 'zip']\n",
    "users = pd.read_table('ml-1m/users.dat', sep='::', engine='python', header=None, names=u_col_name)\n",
    "r_col_name = ['user_id', 'movie_id', 'rating', 'timestamp'] \n",
    "ratings= pd.read_table('ml-1m/ratings.dat', sep='::', engine='python', header=None, names=r_col_name)\n",
    "#\n",
    "data = pd.merge(pd.merge(movies, ratings), users)\n",
    "data"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
